import { defineComponent, ref } from 'vue';
// import Dialog from './components/dialog';
import VirtualKeyboard from './components/virtualKeyboard';
import manyDict from '/public/chowder.json';
import singleDict from '/public/baseDict.json';
const App = defineComponent({
  name: 'App',
  setup() {
    const value = ref('');
    const showKeyboard = ref(false);
    const methods = {
      //点击键盘的值
      clickKey(key) {
        // console.log('key-->>',key);
      },
      //点击键盘时数字的值
      clickNumber(key) {
        // console.log('key-->>',key);
      }
    }
    return () => (
      <div>
        <div>
          中文：<input
            id='elem'
            style='width: 400px; height: 25px; font-size: 20px'
            type='text'
            v-model={value.value}
          />
        </div>
        <div style='height: 400px'></div>
        <VirtualKeyboard
          transitionTime={'0.5s'}
          maxQuantify={10}
          showKeyboard={showKeyboard.value}
          on-clickKey={methods.clickKey}
          float
          manyDict={manyDict}
          singleDict={singleDict}
          on-clickNumber={methods.clickNumber}
          blurHide={false}
        />
      </div>
    )
  }
});

export default App;
